package org.coder.boot.consumer;

import org.coder.api.EchoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @description:
 * @author: coder97
 * @since: 2021/03/16
 */
@Controller
public class EchoController {

    @Autowired
    private EchoService echoService;

    @ResponseBody
    @RequestMapping(value = "/echo")
    public String echo(){
        // TODO 同步修改
        System.out.println("同步修改内容");
        return echoService.echo("from web message");
    }

}